import { WuXingAttrPanel } from "./WuXingAttrPanel";
import { WuXingPlayerInfo } from "../../../model/wuxing/WuXingPlayerInfo";
import { PlayerEqStrengthInfo } from "../equip/PlayerEqStrengthInfo";
import { GModuleEvent } from "../../../mvc/GModuleEvent";
import { WuXingCache } from "../../../cache/WuXingCache";
import { WuXingSkillList } from "../../wuxing/WuXingSkillList";
type int = number;
//class PlayerWuXingPanel
    
    export  class PlayerWuXingPanel extends WuXingAttrPanel
    {
        constructor(arg1: int=0, arg2: int=0)
        {
            super(arg1, arg2);
            return;
        }

        public /* override */ updateData(arg1: WuXingPlayerInfo): void
        {
            super.updateData(arg1);
            _wxIconBody.toolTipData = PlayerEqStrengthInfo.getSpriteTargetToolTip(GModuleEvent.Mode_Other);
            updateWxMagicAndSLTxValue(arg1.magicItemArr, arg1.allEquipItemArr);
            return;
        }

        public /* override */ updateAttrTxPos(arg1: int): void
        {
            if (arg1 < WuXingCache.SHENGLINGOPENLV) 
            {
                _wxBg.visible = true;
                _lingliTxt.x = 78;
                _lingliTxt.y = 198;
                _jiachengTxt.x = 244;
                _jiachengTxt.y = 198;
                _fightValueTxt.y = 260;
                _wxFightToolTipSprite.y = 294;
                _wxFightToolTipSprite.x = 85;
                _wxBgNew.visible = false;
                _magicTx.visible = false;
                _shenglingTx.visible = false;
            }
            else 
            {
                _wxBg.visible = false;
                _lingliTxt.x = 30;
                _lingliTxt.y = 220;
                _jiachengTxt.x = 114;
                _jiachengTxt.y = 220;
                _fightValueTxt.y = 300;
                _wxFightToolTipSprite.y = 130;
                _wxFightToolTipSprite.x = 105;
                _wxBgNew.visible = true;
                _magicTx.visible = true;
                _shenglingTx.visible = true;
            }
            return;
        }

        protected /* override */ createSkillList(): void
        {
            _skillList = new WuXingSkillList(_skillListBg.width, _skillListBg.height, 77, false);
            _skillList.x = _skillListBg.x;
            _skillList.y = _skillListBg.y + 3;
            addChild(_skillList);
            _skillList.optAble = false;
            return;
        }

        protected /* override */ createToolTipBody(): void
        {
            super.createToolTipBody();
            _wxIconBody.x = 10;
            _wxIconBody.y = 126;
            return;
        }

        protected /* override */ initUI(): void
        {
            super.initUI();
            _wxBg.x = 75;
            _wxBg.y = 120;
            _wxBgNew.x = 38;
            _wxBgNew.y = 166;
            _lingliTxt.x = 78;
            _lingliTxt.y = 198;
            _jiachengTxt.x = 244;
            _jiachengTxt.y = 198;
            _fightValueTxt.x = 230;
            _fightValueTxt.y = 260;
            _line.y = 327;
            _wxFightToolTipSprite.x = 85;
            _wxFightToolTipSprite.y = 294;
            _mainAttrTxt.x = _mainAttrTxt.x + 40;
            _mainAttrTxt.y = _mainAttrTxt.y - 55;
            _skillTxt.x = _skillTxt.x + 40;
            _skillTxt.y = _skillTxt.y - 55;
            _otherTxt.x = _otherTxt.x + 40;
            _otherTxt.y = _otherTxt.y - 55;
            _aboutTxt.x = _aboutTxt.x + 40;
            _aboutTxt.y = _aboutTxt.y - 55;
            _magicTx.x = 194;
            _shenglingTx.x = 277;
            return;
        }
    }
